package com.ruoyi.project.ypjxc.domain;

import com.ruoyi.framework.web.domain.BaseEntity;

import java.util.Objects;

public class Buy extends BaseEntity {
    private Long buyId;
    private String drugName;
    private String drugCode;
    private String drugFactory;
    private String drugType;
    private String drugRecipetype;
    private String drugUnit;
    private double buyNum;
    private double buyPrice;
    private double buySuprice;
    private Long buyBatchnum;
    private String buyKeyword;
    private String status;

    public String getDrugName() {
        return drugName;
    }

    public void setDrugName(String drugName) {
        this.drugName = drugName;
    }

    public String getDrugCode() {
        return drugCode;
    }

    public void setDrugCode(String drugCode) {
        this.drugCode = drugCode;
    }

    public String getDrugFactory() {
        return drugFactory;
    }

    public void setDrugFactory(String drugFactory) {
        this.drugFactory = drugFactory;
    }

    public String getDrugType() {
        return drugType;
    }

    public void setDrugType(String drugType) {
        this.drugType = drugType;
    }

    public String getDrugRecipetype() {
        return drugRecipetype;
    }

    public void setDrugRecipetype(String drugRecipetype) {
        this.drugRecipetype = drugRecipetype;
    }

    public String getDrugUnit() {
        return drugUnit;
    }

    public void setDrugUnit(String drugUnit) {
        this.drugUnit = drugUnit;
    }

    public double getBuyNum() {
        return buyNum;
    }

    public void setBuyNum(double buyNum) {
        this.buyNum = buyNum;
    }

    public double getBuyPrice() {
        return buyPrice;
    }

    public void setBuyPrice(double buyPrice) {
        this.buyPrice = buyPrice;
    }

    public double getBuySuprice() {
        return buySuprice;
    }

    public void setBuySuprice(double buySuprice) {
        this.buySuprice = buySuprice;
    }

    public Long getBuyBatchnum() {
        return buyBatchnum;
    }

    public void setBuyBatchnum(Long buyBatchnum) {
        this.buyBatchnum = buyBatchnum;
    }

    public String getBuyKeyword() {
        return buyKeyword;
    }

    public void setBuyKeyword(String buyKeyword) {
        this.buyKeyword = buyKeyword;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Long getBuyId() {
        return buyId;
    }

    public void setBuyId(Long buyId) {
        this.buyId = buyId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Buy buy = (Buy) o;
        return Double.compare(buy.buyNum, buyNum) == 0 &&
                Double.compare(buy.buyPrice, buyPrice) == 0 &&
                Double.compare(buy.buySuprice, buySuprice) == 0 &&
                Objects.equals(buyId, buy.buyId) &&
                Objects.equals(drugName, buy.drugName) &&
                Objects.equals(drugCode, buy.drugCode) &&
                Objects.equals(drugFactory, buy.drugFactory) &&
                Objects.equals(drugType, buy.drugType) &&
                Objects.equals(drugRecipetype, buy.drugRecipetype) &&
                Objects.equals(drugUnit, buy.drugUnit) &&
                Objects.equals(buyBatchnum, buy.buyBatchnum) &&
                Objects.equals(buyKeyword, buy.buyKeyword) &&
                Objects.equals(status, buy.status);
    }

    @Override
    public int hashCode() {
        return Objects.hash(buyId, drugName, drugCode, drugFactory, drugType, drugRecipetype, drugUnit, buyNum, buyPrice, buySuprice, buyBatchnum, buyKeyword, status);
    }

    @Override
    public String toString() {
        return "Buy{" +
                "buyId=" + buyId +
                ", drugName='" + drugName + '\'' +
                ", drugCode='" + drugCode + '\'' +
                ", drugFactory='" + drugFactory + '\'' +
                ", drugType='" + drugType + '\'' +
                ", drugRecipetype='" + drugRecipetype + '\'' +
                ", drugUnit='" + drugUnit + '\'' +
                ", buyNum=" + buyNum +
                ", buyPrice=" + buyPrice +
                ", buySuprice=" + buySuprice +
                ", buyBatchnum=" + buyBatchnum +
                ", buyKeyword='" + buyKeyword + '\'' +
                ", status='" + status + '\'' +
                '}';
    }

    public Buy(Long buyId, String drugName, String drugCode, String drugFactory, String drugType, String drugRecipetype, String drugUnit, double buyNum, double buyPrice, double buySuprice, Long buyBatchnum, String buyKeyword, String status) {
        this.buyId = buyId;
        this.drugName = drugName;
        this.drugCode = drugCode;
        this.drugFactory = drugFactory;
        this.drugType = drugType;
        this.drugRecipetype = drugRecipetype;
        this.drugUnit = drugUnit;
        this.buyNum = buyNum;
        this.buyPrice = buyPrice;
        this.buySuprice = buySuprice;
        this.buyBatchnum = buyBatchnum;
        this.buyKeyword = buyKeyword;
        this.status = status;
    }

    public Buy() {
    }
}
